import React from 'react'
import "./Left.less"

function Left(props) {
    let { cate, n, changeN } = props
    return (
        <div className="left">
            {cate.map((item, index) => (
                <div key={item.id} className="item" onClick={() => changeN(index)}>
                    <div className={n == index ? "active" : ""}>
                        {item.catename}
                    </div>
                </div>
            ))
            }
        </div>
    )
}
export default React.memo(Left)